Automatic generation of object oriented unit tests using genetic programming

نویسنده

  • Stefan Wappler
چکیده

Automating the generation of object-oriented unit tests for structural testing techniques has been challenging many researchers due to the benefits it promises in terms of cost saving and test quality improvement. It requires test sequences to be generated, each of which models a particular scenario in which the class under test is examined. The generation process aims at obtaining a preferably compact set of test sequences which attains a high degree of structural coverage. The degree of achieved structural coverage indicates the adequacy of the tests and hence the test quality in general. Existing approaches to automatic test generation for object-oriented software mainly rely either on symbolic execution and constraint solving, or on a particular search technique. However, these approaches suffer from various limitations which negatively affect both their applicability in terms of classes for which they are feasible, and their effectiveness in terms of achievable structural coverage. The approaches based on symbolic execution and constraint solving inherit the limitations of these techniques, which are, for instance, issues with scalability and problems with loops, arrays, and complex predicates. The search-based approaches encounter problems in the presence of complex predicates and complex method call dependences. In addition, existing work addresses neither testing non-public methods without breaking data encapsulation, nor the occurrence of runtime exceptions during test generation. Yet, data encapsulation, non-public methods, and exception handling are fundamental concepts of object-oriented software and require also particular consideration for testing. This thesis proposes a new approach to automating the generation of object-oriented unit tests. It employs genetic programming, a recent meta-heuristic optimization technique, which allows formulating the task of test sequence generation as a search problem more suitably than the search techniques applied by the existing approaches. The approach enables testing non-public methods and accounts for runtime exceptions by appropriately designing the objective functions that are used to guide the genetic programming search. The value of the approach is shown by a case study with real-world classes that involve non-public methods and runtime exceptions. The structural coverage achieved by the approach is contrasted with that achieved by a random approach and two commercial test sequence generators. In most of the cases, the approach of this thesis outperformed the other methods.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Object-Oriented Method for Automatic Extraction of Road from High Resolution Satellite Images

As the information carried in a high spatial resolution image is not represented by single pixels but by meaningful image objects, which include the association of multiple pixels and their mutual relations, the object based method has become one of the most commonly used strategies for the processing of high resolution imagery. This processing comprises two fundamental and critical steps towar...

متن کامل

Genetic Algorithm for Automatic Generation of Representative Test Suite for Mutation Testing

Discovering bugs in software towards quality of software is given paramount importance in research arena. Towards this end automatic test case generation became essential as manual test data generation and adding test oracles is tedious task. It is more so when there are no formal specifications to unearth the faults in test outcome. Therefore, it is important to generate representative test se...

متن کامل

Dimensionality Reduction and Improving the Performance of Automatic Modulation Classification using Genetic Programming (RESEARCH NOTE)

This paper shows how we can make advantage of using genetic programming in selection of suitable features for automatic modulation recognition. Automatic modulation recognition is one of the essential components of modern receivers. In this regard, selection of suitable features may significantly affect the performance of the process. Simulations were conducted with 5db and 10db SNRs. Test and ...

متن کامل

Automated Test Data Generation Using Fuzzy Logic-Genetic Algorithm Hybridization System for Class Testing Of Object Oriented Programming

In this paper we have explained automatic test data generation particularly for class testing of object oriented programming. During test data generation we have implemented the Genetic program Fuzzy logic control auxiliary hybridization techniques. Some cases genetic algorithm has been used for optimized the desired results. As a future challenges we have made comments on the utilization of th...

متن کامل

Automated Test Generation for AspectJ Programs

Aspect-oriented software development (AOSD) is a new paradigm that improves separation of concerns in software development. AOSD has gained popularity with the adoption of languages such as AspectJ. Automated test generation for AspectJ programs is important for reducing the manual effort in testing AspectJ programs. This position paper proposes Wrasp, a framework for automatic generation of te...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007